﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
    Inherits="Nivdal.TrainingReports" Title="" StylesheetTheme="SkinFile" CodeBehind="TrainingReports.aspx.cs" %>

<asp:Content ID="Content3" ContentPlaceHolderID="PageNamePlaceHolder" runat="Server">
    <asp:Label ID="PageNameLabel" runat="server" Text="<%$ Resources:Resource, TrainingReports_PageNameLabel %>"
        CssClass="PageNameContentStyle"></asp:Label>
</asp:Content>
<asp:Content ID="HeadContent" ContentPlaceHolderID="HeadPlaceHolder" runat="server">
    <script language="javascript" type="text/javascript">

    $(function () {
        $("#ctl00_ctl00_ContentPlaceHolder3_ContentPlaceHolder1_TrainingDataGridView").tablesorter();
        $("#ctl00_ctl00_ContentPlaceHolder3_ContentPlaceHolder1_TrainingOldReportsGridView").tablesorter();
        $("#ctl00_ctl00_ContentPlaceHolder3_ContentPlaceHolder1_AutomaticTrainigGridview").tablesorter();
    })
        

    </script>


</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <%--<asp:Label ID="LatestTrainingReportsLabel" runat="server" Text='<%# Resources.Resource.Global_LatestTrainingReports+ ":"%>'
        SkinID="InfoLabel"></asp:Label>--%>
    <div class="basic_element">
    <div class="red_title">
       <asp:Label ID="LatestTrainingReportsTitleLabel" runat="server" Text='<%$ Resources:Resource, Global_LatestTrainingReports %>' CssClass="white_title"></asp:Label>
    </div>
    <div class="padding5">

    <asp:GridView ID="TrainingDataGridView" runat="server" DataSourceID="TrainingReportsDataSourse"
        AutoGenerateColumns="false" AllowPaging="false" SkinID="SimpleProfessional">
        <Columns>
            <asp:TemplateField HeaderText="<%$ Resources:Resource, Global_Date %>" ItemStyle-Width="15%">
                <HeaderStyle CssClass="CursorPointer" />
                <ItemTemplate>
                    <asp:Label ID="DateSortLabel" runat="server" Text='<%# Eval("SortDate") %>' style="display:none;"></asp:Label>
                    <asp:Label ID="DateLabel" runat="server" Text='<%# Eval("Date") %>' SkinID="GridLabel"></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField  ItemStyle-Width="35%">
                <HeaderStyle CssClass="CursorPointer" />
                <ItemTemplate>
                    <asp:Label ID="TeamTrainingLabel" runat="server" Text="<%$ Resources:Resource, TrainingReports_TeamTrainingLabel %>"
                        SkinID="GridLabel" Visible='<%# Eval("IsTeamReport") %>'></asp:Label>
                    <asp:HyperLink ID="PlayerHyperlink" runat="server" Text='<%# Eval("PlayerName") %>'
                        SkinID="BlackHyperLinkSkin" Visible='<%# Eval("IsPlayerReport") %>' NavigateUrl='<%# Eval("PlayerId", "~/Player.aspx?Id={0}") %>'></asp:HyperLink>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="<%$ Resources:Resource, Global_Attribute %>"  ItemStyle-Width="20%">
                <HeaderStyle CssClass="CursorPointer" />
                <ItemTemplate>
                    <asp:Label ID="AttributeLabel" runat="server" Text='<%# Eval("Attribute") %>' SkinID="GridLabel"
                        Visible='<%# Eval("IsPlayerReport") %>'></asp:Label>
                    <asp:Label ID="TeamAttributeLabel" runat="server" Text='<%# Eval("TeamAttributeName") %>'
                        SkinID="GridLabel" Visible='<%# Eval("IsTeamReport") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="<%$ Resources:Resource, Global_Change %>"  ItemStyle-Width="20%">
                <HeaderStyle CssClass="CursorPointer" />
                <ItemTemplate>
                    <asp:Label ID="OldValueLabel" runat="server" Text='<%# Eval("OldValue") %>' SkinID="GridLabel"></asp:Label>
                    <asp:Label ID="FromToLabel" runat="server" Text=" -> " SkinID="GridLabel"></asp:Label>
                    <asp:Label ID="NewValueLabel" runat="server" Text='<%# Eval("NewValue") %>' SkinID="GridLabel"></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField  ItemStyle-Width="10%" HeaderText="<%$ Resources:Resource, Global_Hours %>">
                <ItemTemplate>
                    <asp:Label ID="TrainingHoursLabel" runat="server" Text='<%# Eval("TrainingHours") %>' SkinID="GridLabel"
                     Visible='<%# Eval("TrainingHours").ToString() != "0" %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
        <EmptyDataTemplate>
            <asp:Label ID="EmptyDataLabel" runat="server" Text="<%$ Resources:Resource, TrainingReports_EmptyDataLabel %>"
                SkinID="GridLabel"></asp:Label>
        </EmptyDataTemplate>
    </asp:GridView>
    </div>
    </div>
    <asp:Panel ID="OlderTrainingReportsPanel" runat="server">
        <div class="basic_element">
        <div class="red_title">
           <asp:Label ID="OlderTrainingReportsTitleLabel" runat="server" Text="<%$ Resources:Resource, TrainingReports_OlderTrainingReportsTitleLabel %>" CssClass="white_title"></asp:Label>
        </div>
        <div class="padding5">
            <asp:GridView ID="TrainingOldReportsGridView" runat="server" DataSourceID="TrainingOldReportsDataSourse"
            AllowPaging="false" AutoGenerateColumns="false" SkinID="SimpleProfessional">
            <Columns>
                <asp:TemplateField HeaderText="<%$ Resources:Resource, Global_Date %>" ItemStyle-Width="15%" >
                    <HeaderStyle CssClass="CursorPointer" />
                    <ItemTemplate>
                        <asp:Label ID="DateSortLabel" runat="server" Text='<%# Eval("SortDate") %>' style="display:none;"></asp:Label>
                        <asp:Label ID="DateLabel" runat="server" Text='<%# Eval("Date") %>' SkinID="GridLabel"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="<%$ Resources:Resource, TrainingReports_PlayerTeamHeaderText %>" ItemStyle-Width="35%" >
                    <HeaderStyle CssClass="CursorPointer" />
                    <ItemTemplate>
                        <asp:Label ID="TeamTrainingLabel" runat="server" Text="<%$ Resources:Resource, TrainingReports_TeamTrainingLabel %>"
                            SkinID="GridLabel" Visible='<%# Eval("IsTeamReport") %>'></asp:Label>
                        <asp:HyperLink ID="PlayerHyperlink" runat="server" Text='<%# Eval("PlayerName") %>'
                            SkinID="BlackHyperLinkSkin" Visible='<%# Eval("IsPlayerReport") %>' NavigateUrl='<%# Eval("PlayerId", "~/Player.aspx?Id={0}") %>'></asp:HyperLink>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="<%$ Resources:Resource, Global_Attribute %>" ItemStyle-Width="20%" >
                    <HeaderStyle CssClass="CursorPointer" />
                    <ItemTemplate>
                        <asp:Label ID="AttributeLabel" runat="server" Text='<%# Eval("Attribute") %>' SkinID="GridLabel"
                            Visible='<%# Eval("IsPlayerReport") %>'></asp:Label>
                        <asp:Label ID="TeamAttributeLabel" runat="server" Text='<%# Eval("TeamAttributeName") %>'
                            SkinID="GridLabel" Visible='<%# Eval("IsTeamReport") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="<%$ Resources:Resource, Global_Change %>" ItemStyle-Width="20%" >
                    <HeaderStyle CssClass="CursorPointer" />
                    <ItemTemplate>
                        <asp:Label ID="OldValueLabel" runat="server" Text='<%# Eval("OldValue") %>' SkinID="GridLabel"></asp:Label>
                        <asp:Label ID="FromToLabel" runat="server" Text=" -> " SkinID="GridLabel"></asp:Label>
                        <asp:Label ID="NewValueLabel" runat="server" Text='<%# Eval("NewValue") %>' SkinID="GridLabel"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField  ItemStyle-Width="10%" HeaderText="<%$ Resources:Resource, Global_Hours %>">
                    <ItemTemplate>
                        <asp:Label ID="TrainingHoursLabel" runat="server" Text='<%# Eval("TrainingHours") %>' SkinID="GridLabel"
                            Visible='<%# Eval("TrainingHours").ToString() != "0" %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <EmptyDataTemplate>
                <asp:Label ID="NoOldReportsLabel" runat="server" Text="<%$ Resources:Resource, TrainingReports_NoOldReportsLabel %>"></asp:Label>
            </EmptyDataTemplate>
        </asp:GridView>
        </div>
        </div>
        
    </asp:Panel>
    <asp:Panel ID="AutomaticTrainingPanel" runat="server">
        <div class="basic_element">
        <div class="red_title">
           <asp:Label ID="AutomaticTrainingTitleLabel" runat="server" Text="<%$ Resources:Resource, TrainingReports_AutomaticTrainingTitleLabel %>" CssClass="white_title"></asp:Label>
            
        </div>
        <div class="padding5">

        
        <asp:GridView ID="AutomaticTrainigGridview" runat="server" DataSourceID="TrainingAutomaticReportsDataSourse" AllowPaging="false"
         AutoGenerateColumns="false" SkinID="SimpleProfessional">
         <Columns>
                <asp:TemplateField HeaderText="<%$ Resources:Resource, Global_Date %>" ItemStyle-Width="15%" >
                    <HeaderStyle CssClass="CursorPointer" />
                    <ItemTemplate>
                        <asp:Label ID="DateSortLabel" runat="server" Text='<%# Eval("SortDate") %>' style="display:none;"></asp:Label>
                        <asp:Label ID="DateLabel" runat="server" Text='<%# Eval("Date") %>' SkinID="GridLabel"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="<%$ Resources:Resource, Global_Player %>" ItemStyle-Width="35%" >
                    <HeaderStyle CssClass="CursorPointer" />
                    <ItemTemplate>
                        <asp:HyperLink ID="PlayerHyperlink" runat="server" Text='<%# Eval("PlayerName") %>'
                            SkinID="BlackHyperLinkSkin" NavigateUrl='<%# Eval("PlayerId", "~/Player.aspx?Id={0}") %>'></asp:HyperLink>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="<%$ Resources:Resource, Global_Attribute %>" ItemStyle-Width="25%" >
                    <HeaderStyle CssClass="CursorPointer" />
                    <ItemTemplate>
                        <asp:Label ID="AttributeLabel" runat="server" Text='<%# Eval("Attribute") %>' SkinID="GridLabel"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="<%$ Resources:Resource, Global_Change %>" ItemStyle-Width="25%" >
                    <HeaderStyle CssClass="CursorPointer" />
                    <ItemTemplate>
                        <asp:Label ID="OldValueLabel" runat="server" Text='<%# Eval("OldValue") %>' SkinID="GridLabel"></asp:Label>
                        <asp:Label ID="FromToLabel" runat="server" Text=" -> " SkinID="GridLabel"></asp:Label>
                        <asp:Label ID="NewValueLabel" runat="server" Text='<%# Eval("NewValue") %>' SkinID="GridLabel"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
         </Columns>
        </asp:GridView>
        </div>
        </div>
    </asp:Panel>


    <asp:HyperLink ID="TrainingPageHyperlink" runat="server" SkinID="GreenTitleHyperLink"
        Text="<%$ Resources:Resource, TrainingReports_TrainingPageHyperlink %>" NavigateUrl="~/Training.aspx"></asp:HyperLink>
    <asp:SqlDataSource ID="TrainingReportsDataSourse" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        SelectCommand="Nivdal_TrainingGetTrainingReports" SelectCommandType="StoredProcedure">
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="TrainingOldReportsDataSourse" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        SelectCommand="Nivdal_TrainingGetOldTrainingReports" SelectCommandType="StoredProcedure">
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="TrainingAutomaticReportsDataSourse" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        SelectCommand="Nivdal_TrainingGetAutomaticTrainingReports" SelectCommandType="StoredProcedure">
    </asp:SqlDataSource>
</asp:Content>
